package com.web.vo.mapper;

import com.web.vo.RoomVo;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by chen on 2017/3/18.
 */
public class RoomVoMapper implements RowMapper<RoomVo> {
    public RoomVo mapRow(ResultSet resultSet, int i) throws SQLException {
        RoomVo roomVo = new RoomVo();
        roomVo.setRoomId(resultSet.getInt("roomId"));
        roomVo.setRoomName(resultSet.getString("roomName"));
        roomVo.setRoomType(resultSet.getString("roomType"));
        roomVo.setRoomStatus(resultSet.getInt("roomStatus"));
        roomVo.setRoomPay(resultSet.getInt("roomPay"));
        roomVo.setRoomDescription(resultSet.getString("roomDescription"));
        roomVo.setHotelId(resultSet.getInt("hotelId"));
        roomVo.setRoomPicture(resultSet.getString("roomPicture"));
        roomVo.setCount(resultSet.getString("count"));
        return roomVo;
    }
}
